package com.fzy.designpattern.observer.jdk;

import java.util.Observable;

/**
 * 继承jdk的Observable来实现主题信息
 *
 * @author 冯赵杨
 * @create 2018/9/12
 */
public class ConcreteSubject extends Observable {

    private int state;

    public void set(int state){
        this.state = state;

        setChanged();
        notifyObservers();
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }
}
